﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace hse_2013_e_booking
{
    public partial class BookForm : Form
    {
        public BookForm()
        {
            InitializeComponent();
        }


        public bool advanced;

        private void BookForm_Load(object sender, EventArgs e)
        {

            chekoutDate.Value = chekinDate.Value.AddDays(7);
            userControl1.autoTimer.Enabled = true;
            additBox.Checked = advanced;

            
        }

       

        private void additBox_CheckedChanged(object sender, EventArgs e)
        {
            advanced = additBox.Checked;
            groupBox1.Visible = advanced;
            label1.Visible = advanced;
            label8.Visible = advanced;
            label9.Visible = advanced;
            comboBox1.Visible = advanced;
            comboBox2.Visible = advanced;
            classBox.Visible = advanced;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Outcome form = new Outcome();
            form.Owner = this;
            Hotel.Вывод(Hotel.spisok, form.dataGridView1,comboBox1.Text,classBox.Text,comboBox2.Text);
          
           

            form.Show();
            this.Hide();
        }

        private void BookForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            Application.Exit();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Hide();
            MainForm mf = new MainForm();
            mf.Show();
        }

     

    

     
    }
}
